<template>
  <div class="container">
    <div class="center">欢迎来到小囧的网站<button @click="toLogin">登录</button></div>

  </div>
</template>
<script>
import { onMounted, reactive, toRefs } from 'vue'
import { useRouter } from 'vue-router'
export default {
  components: {
  },
  setup () {
    const router = useRouter()
    const state = reactive({
    })
    // 获取首页数据
    onMounted(() => {
    })
    const toLogin = () => {
      router.push('/login')
    }
    return {
      ...toRefs(state),
      toLogin,
    }
  },
}
</script>
<style scoped lang="less">
.center {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%);
  color: #f00;
  cursor: pointer;
}
</style>